package org.emet.dao;

import java.util.List;

import org.emet.entity.biz.FreezerCase;
import org.emet.jee.core.dao.arch.ArchDataSourceBaseDao;
import org.springframework.stereotype.Repository;

@Repository
public class FreezerCaseDao extends ArchDataSourceBaseDao<FreezerCase, Long> {

	public void removeByFreezer(Long id) {
		//batchExecute("delete from FreezerCase where freezerId = ?", id);
		List<FreezerCase> cases = findBy("freezerId", id);
		for (FreezerCase freezerCase : cases) {
			delete(freezerCase);
		}
	}

}
